﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace lcps.Web
{
    public partial class ShowArticle : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request["id"]) && !string.IsNullOrEmpty(Request["type"]))
                {
                    int id = Convert.ToInt32(Request["id"]);

                    Bind(id, Request["type"]);
                }
            }
        }

        private void Bind(int art_id, string type)
        {

            if (type == "1")
            {
                this.lbl_type.Text = "物资供应管理规章制度";
            }

            if (type == "2")
            {
                this.lbl_type.Text = " 履约班组建设";
            }

            if (type == "3")
            {
                this.lbl_type.Text = "管理创新";
            }


            lcps.Model.article ds = new lcps.BLL.article().GetModel(art_id);

            if (ds != null)
            {
                this.lbl_title.Text = ds.title;
                this.lbl_time.Text = "发布日期："+ds.pubtime.ToString();
                this.lbl_content.Text = ds.content;
            }


        }
    }
}